009 basic displays
欢迎大家回来。
Welcome back everybody.
看起来像是显示了点钟。
It looks like it's displays oclock.
那么让我们回到这里,开始研究如何创建一些显示。
So let's jump back in here and let's start working on how we can create some displays.
我首先要向您展示的一件事是,您会看到我们如何获得此文本框,我们看到我们可以使用它并创建条目,然后我们可以将它们写入大海。
One thing I'm going to start by showing you is that you see how we've already got this text box and we saw that we could use that and create entries and we could write them into the sea.
好吧,检查一下。
Well check this out.
我将复制该内容并将另一内容粘贴到此处。
I'm going to copy that and paste another one here.
我要把它放在它旁边。
I'm going to put that right here next to it.
只是为了进行比较,双击它,您会看到我们在中间有一个启用输入的框。
Just for comparison sake double click that and you see here we have this input enabled box right in the middle.
好吧,如果我检查一下并关闭,看看这个。
Well if I check that and close out of there look at this.
每当我回来运行时,这个现在都会显示为已禁用。
Whenever I come back in to run this one now shows up is disabled.
我不能再写信了。
I can't write to it anymore.
因此,尽管这是一个非常好的输入表单,但我实际上可以将其变成一个简单的文本显示。
So even though this is a perfectly good entry form I can actually turn it into a simple textual display.
这是一种可以实际显示 PC 中某些值的快速、简单的方法。
That's one quick and easy way that you can actually display some values from your PC.
我们还能做什么。
What else can we do.
我们还希望能够展示一些数字价值。
We also want to be able to show some digital values.
那么让我们回到符号。
So let's go back into symbols.
我想你会发现,每当你创建 Chameides 时,你几乎一直在使用这些符号,并且想知道在哪里以及为什么不使用这些符号。
And I think you're going to find that you use these symbols pretty much all of the time whenever you're creating a Chameides and wonder where and why wouldn't you.
因为这些东西实际上真的很棒。
Because these things are actually really great.
让我们到这里来,我要看看指示灯,这里我只有一些简单的指示器。
Let's come up here and I'm going to look at pilot lights and here I've got just some simple indicators.
非常经典的照明灯,我将从这个绿灯开始,我只需将其放在那里并双击它,我就将其设置为默认缓慢闪烁。
Really classic kind of illuminating lights and I'm going to start off by taking this green light and I'm just going to drop that in right there and double click on that and I've got it set it this default blink slow.
这是我真的不想在这里使用的东西,所以我要继续删除它,然后看到一个小提琴让我创建一个标签。
Which is something that I really don't want to use here so I'm going to go ahead and delete that out and see a fiddle let me create a tag.
而且确实如此啊。
And it really ah.
好吧,如果我点击退出并点击返回,它确实给了我创建标签的选项,我将需要一个新标签。
Ok so if I clicked out and clicked back and it does give me the option to create a tag I'm going to need a new tag.
所以我需要一个布尔值,我将单击它并点击“新建”。
So I need a boolean I'm going to click on that and hit new.
我将把它设置为布尔值,这将是我姐姐运行的。
I'm going to set this up as a boolean and this is going to be my sis running.
当然,我会把它和我的部分联系起来。
And of course I'm going to tie that to my bit.
这告诉我们系统正在运行。
That tells us that the system is running.
所以我要点击它并点击“确定”。
So I'm going to click on that and hit OK.
所以现在我已经选择了它。
So now I've got that selected.
然后我可以出于恐惧而关闭,但请记住,除非我在通信中设置该标签,否则该标签不会起作用。
And then I can close out of fear but remember that tag isn't going to work until I set that up in communications.
那么让我们进来吧。
So let's come in here.
右键单击插入标签。
Right click insert tag.
我要让我的系统运行起来,但我记不清了,所以让我们回来检查一下它是 B-3 3 8。
I'm going to take my system running and I don't remember that off the top of my head so let's come back in and check it's B-3 3 8.
所以我可以直接输入 B-3 冒号三斜线八。
So I can type that right out B-3 colon three slash eight.
现在应该可以了。
And now that should work.
所以让我们关闭它并点击“是”来保存它。
So let's close this and hit yes to save it.
我将直接跳回到运行时。
And I'm just going to jump right back into run time on this.
您会看到有一点延迟,因此在我们尝试更改任何内容之前,让我们给它几秒钟的时间来唤醒它。
And you see there's this little bit of delay so let's give it a couple of seconds for this thing to wake up before we try to change anything.
如果我点击 START,我们将不会进入启动状态,因为我们将其中一种方式设置为两种模式 0。
And if I hit START we're not going to go into start because we set one of our ways in two mode 0.
那么让我们将其放回模式 2。
So let's put that back into mode 2.
现在,当我们开始时,我们的小绿灯果然亮起,我将其更改回模式 1,以便我们的灯熄灭。
And now when we start Sure enough our little green light lights up and I'm going to just change this back down into Mode 1 so that our light goes off.
就这样吧。
There you go.
所以灯亮、灯灭就可以了。
So lights on and lights off it works.
所以我要离开这里。
So I'm going to exit out of here.
这是一种非常简单的数字指示。
And that's a really simple kind of digital indication.
还有其他一些,但现在我要讨论一些更有趣的事情。
And there are others but right now I'm going to get into something a little bit more interesting.
为什么我们不显示我们的油箱液位呢?
Why don't we show our tank level.
我喜欢显示水箱液位,尤其是在此应用程序中,因为它可能是最重要的事情之一。
I love showing tank level especially on this application because it's probably one of the most important things there is.
因此,为了做到这一点,让我们回到图形,重新打开我们的符号,我将直接来到坦克这里,并真正对这个东西充满热情,我们这里有各种不同的坦克。
So to do that let's come back into graphics open our symbols back up and I'm going to come straight down here to tanks and just really go for the gusto on this thing and we've got all kinds of different tanks up here.
但这第一辆坦克看起来很适合我们。
But this first tank looks perfect for us.
所以我就把它放在那里,它有点小。
So I'm just going to drop that in there and it's a little small.
你会注意到,如果我尝试调整它的大小,它不会让我这么做,但有一种方法可以让它让你这么做。
And you notice if I try to resize it it doesn't let me but there's a way to get it to let you.
如果我双击这个东西,你会在这里看到它说使用链接大小。
If I double click on this thing you see here it says use Linked size.
好吧,我要取消选中它,现在我实际上可以将这个水箱培育得相当大且看起来令人讨厌。
Well I'm going to uncheck that and now I can actually grow this tank up pretty big and obnoxious looking.
因此,让我们继续这样做,然后我将跳回到这里。
So let's go ahead and make it about like that and then I'm going to jump back in here.
我已经得到了模拟值的主标签级别。
I've got this main tag level of analog value.
我们当然不希望这样。
Of course we don't want that.
因此,让我们摆脱它,回到这里,我将前往里约,因为那是我创建水箱液位的地方。
So let's get rid of that come back in here and I'm going to go into Rio because that's where I created my tank level.
我将选择它。
And I'm just going to select that.
所以我的人和我的 Mac 实际上是完美的,因为我们按原样从 0 扩展到 100。
So my men and my Macs are actually perfect because we're scaling from 0 to 100 as is.
让我们继续,X 离开那里,运行这个东西,看看它开箱即用是什么样子。
Let's go ahead and X out of there and run this thing and just see what it looks like right out of the box.
嘿,我们里面有一个蓝色级别,但它没有运行。
Hey we've got a blue level inside and it's not running.
那么让我们继续打开我们的系统。
So let's go ahead and turn our system on.
现在我们实际上应该看到这个水平,但我们可以看到它正在耗尽。
Now we should actually see that level yet we can see it draining.
很难看到,因为它移动得很慢,但那家伙实际上正在爬下来。
It's kind of hard to see because it's moving so slow but that guy is actually creeping down.
现在我们知道如何显示一些东西,我们可以显示我们的数字,我们可以显示我们的模拟。
So all right now we know how to display some things we can display our digitals we can display our analogs.
您已经看到,您实际上可以使用大多数控件来服务显示和显示值。
And you've seen that you can actually use most of your controls to service displays and display values as well.
此时就可以发送信息了。
At this point you can send information in.
您可以获取信息并将其显示在屏幕上。
You can get information out and show it on the screen.
现在你真的已经拥有了创造自然奇景所需的一切,当然就像我们对建造者所做的那样。
You've really got everything you need at this point to create a nature in wonder where of course just like we did with the builder.
别担心,因为我们会更深入。
Don't worry because we're going to go a lot deeper.
那么我们下节课再见。
So I'll see you in the next lecture.
干杯
Cheers